//
//  HLBShopeDefaultView.m
//  dyseller
//
//  Created by 红喇叭 on 2017/11/27.
//  Copyright © 2017年 红喇叭. All rights reserved.
//

#import "HLBShopeDefaultView.h"

@implementation HLBShopeDefaultView

- (instancetype)initWithFrame:(CGRect)frame hintName:(NSString *)imgaeName hintTitle:(NSString *)title{
    self = [super initWithFrame:frame];
    if(self){
        self.backgroundColor = ControllerColor;
        [self initView:imgaeName title:title];
    }
    return self;
}

- (void)initView:(NSString*)iamgeName title:(NSString *)title{
    UIImage *image = [UIImage imageNamed:iamgeName];
    UIImageView *topImg = [[UIImageView alloc] initWithImage:image];
    
    [self addSubview:topImg];
    topImg.sd_layout.topSpaceToView(self, GETHEIGHT(132)).centerXEqualToView(self).
    widthIs(image.size.width).heightIs(image.size.height);
    
    UILabel *hintLab = [[UILabel alloc] init];
    hintLab.text = title;
    hintLab.font = font17;
    hintLab.textColor = RGB(231, 26, 65);
    hintLab.textAlignment= NSTextAlignmentCenter;
    [self addSubview:hintLab];
    hintLab.sd_layout.topSpaceToView(topImg, 25).widthIs(self.width).
    heightIs(24).centerXEqualToView(self);
    
    UILabel *titleLab = [[UILabel alloc] init];
    titleLab.textColor = kGrayColor;
    titleLab.font = font13;
    titleLab.text = @"快去DIY您的人气店铺吧~";
    titleLab.textAlignment= NSTextAlignmentCenter;
    [self addSubview:titleLab];
    titleLab.sd_layout.topSpaceToView(hintLab, 10).widthIs(self.width).
    heightIs(15).centerXEqualToView(self);
    
    _actionBtn = [[UIButton alloc] init];
    [_actionBtn setTitleColor:MianRedColor forState:UIControlStateNormal];
    
    [_actionBtn setBackgroundImage:[UIImage imageNamed:@"edit_button3_default_nor"] forState:UIControlStateNormal];
    _actionBtn.titleLabel.font = font14;
    [self addSubview:_actionBtn];
    _actionBtn.sd_layout.topSpaceToView(titleLab, GETHEIGHT(90)).widthIs(GETWITH(250)).heightIs(GETHEIGHT(54))
    .centerXEqualToView(self);

}

@end
